<template>
  <div>
    <div
      class="user-center usercenter-mode1 background-ele"
      style="
        color: rgb(51, 51, 51);
        height: auto;
        opacity: 1;
        margin-top: 0px;
        font-size: 16px;
      "
    >
      <div
        class="show-div header"
        style="
          opacity: 1;
          height: 100px;
          background-image: url(https://ccdn.goodq.top/caches/b612f5f6bf79280f5c9faca54839a719/aHR0cDovLzVjNjRkNjYzNTE5OGMudDczLnFpZmVpeWUuY29tL3FmeS1jb250ZW50L3VwbG9hZHMvMjAxOS8wMi80ZjNlZTFhOTlmNDEzY2YxNWVjYTM5YWY2MGI0NGRiYi5qcGc_p_p100_p_3D.m.jpg);
          background-color: #fcfcfc;
          font-size: 16px;
          font-weight: normal;
          font-style: normal;
          font-family: 默认;
          color: #ffffff;
        "
      >
        <span class="empty-span"></span>
       
        <span class="nickname"> 12345678900email-com</span>
          <span class="icon-rightarrow" style="font-size: 12px"></span>
        
        <span class="empty-span"></span>
      </div>
      <div class="horizontal-router-container1">
        <div
          @click="$router.push('/order')"
          style="
            opacity: 1;
            font-size: 12px;
            margin-top: 5px;
            color: #353535;
            background-color: #ffffff;
          "
        >
          <p
            style="
              height: 45px;
              line-height: 45px;
              border-bottom: 1px solid #f4f4f4;
              text-indent: 20px;
              font-size: 14px;
              font-weight: bold;
              font-style: normal;
              font-family: 默认;
            "
          >
            我的订单
          </p>
          <ul class="block-item">
            <li
              class="usercenter-mode-one router"
              data-router="myOrder"
              style="
                vertical-align: top;
                text-align: center;
                display: inline-block;
                padding-left: 20px;
                line-height: 54px;
                height: 54px;
                width: 25%;
                box-sizing: border-box;
                float: left;
              "
            >
              <div
                style="
                  line-height: normal;
                  vertical-align: middle;
                  display: inline-block;
                  width: 100%;
                  position: relative;
                "
              >
                  <van-icon size="20" name="balance-pay" />
                  <span
                    style="
                      vertical-align: middle;
                      display: inline-block;
                      text-overflow: ellipsis;
                      white-space: nowrap;
                      overflow: hidden;
                      width: 100%;
                      font-size: 12px;
                      font-weight: normal;
                      font-style: normal;
                      font-family: 默认;
                    "
                  >
                    未付款</span
                  >
              </div>
            </li>
            <li
              class="usercenter-mode-one router"
              data-router="myOrder"
              style="
                vertical-align: top;
                text-align: center;
                display: inline-block;
                padding-left: 20px;
                line-height: 54px;
                height: 54px;
                width: 25%;
                box-sizing: border-box;
                float: left;
              "
            >
              <div
                style="
                  line-height: normal;
                  vertical-align: middle;
                  display: inline-block;
                  width: 100%;
                  position: relative;
                "
              >
                <van-icon size="20" name="clock-o" />
                
                  <span
                    style="
                      vertical-align: middle;
                      display: inline-block;
                      text-overflow: ellipsis;
                      white-space: nowrap;
                      overflow: hidden;
                      width: 100%;
                      font-size: 12px;
                      font-weight: normal;
                      font-style: normal;
                      font-family: 默认;
                    "
                  >
                    等待中</span
                  >
               
              </div>
            </li>
            <li
              class="usercenter-mode-one router"
              data-router="myOrder"
              style="
                vertical-align: top;
                text-align: center;
                display: inline-block;
                padding-left: 20px;
                line-height: 54px;
                height: 54px;
                width: 25%;
                box-sizing: border-box;
                float: left;
              "
            >
              <div
                style="
                  line-height: normal;
                  vertical-align: middle;
                  display: inline-block;
                  width: 100%;
                  position: relative;
                "
              >
                <van-icon size="20" name="certificate" />
                  <span
                    style="
                      vertical-align: middle;
                      display: inline-block;
                      text-overflow: ellipsis;
                      white-space: nowrap;
                      overflow: hidden;
                      width: 100%;
                      font-size: 12px;
                      font-weight: normal;
                      font-style: normal;
                      font-family: 默认;
                    "
                  >
                    已付款</span
                  >
               
              </div>
            </li>
            <li
              class="usercenter-mode-one router"
              data-router="myOrder"
              style="
                vertical-align: top;
                text-align: center;
                display: inline-block;
                padding-left: 20px;
                line-height: 54px;
                height: 54px;
                width: 25%;
                box-sizing: border-box;
                float: left;
              "
            >
              <div
                style="
                  line-height: normal;
                  vertical-align: middle;
                  display: inline-block;
                  width: 100%;
                  position: relative;
                "
              >
               <van-icon size="20" name="logistics" />
                  <span
                    style="
                      vertical-align: middle;
                      display: inline-block;
                      text-overflow: ellipsis;
                      white-space: nowrap;
                      overflow: hidden;
                      width: 100%;
                      font-size: 12px;
                      font-weight: normal;
                      font-style: normal;
                      font-family: 默认;
                    "
                  >
                    已发货</span
                  >
              </div>
            </li>
            <li style="clear: both; height: 0"></li>
          </ul>
        </div>
        <div
          style="
            opacity: 1;
            font-size: 12px;
            margin-top: 5px;
            color: #353535;
            background-color: #ffffff;
          "
        >
          <p
            style="
              height: 45px;
              line-height: 45px;
              border-bottom: 1px solid #f4f4f4;
              text-indent: 20px;
              font-size: 14px;
              font-weight: bold;
              font-style: normal;
              font-family: 默认;
            "
          >
            我的工具
          </p>
          <ul class="block-item">
            <li
              class="usercenter-mode-one router"
              data-router="myOrder"
              style="
                vertical-align: top;
                text-align: center;
                display: inline-block;
                padding-left: 20px;
                line-height: 54px;
                height: 54px;
                width: 25%;
                box-sizing: border-box;
                float: left;
              "
            >
              <div
               @click="$router.push('/main/car')"
                style="
                  line-height: normal;
                  vertical-align: middle;
                  display: inline-block;
                  width: 100%;
                  position: relative;
                "
              >
                <van-icon size="20" name="shopping-cart-o" />
                  <span
                    style="
                      vertical-align: middle;
                      display: inline-block;
                      text-overflow: ellipsis;
                      white-space: nowrap;
                      overflow: hidden;
                      width: 100%;
                      font-size: 12px;
                      font-weight: normal;
                      font-style: normal;
                      font-family: 默认;
                    "
                  >
                    购物车</span
                  >
               
              </div>
            </li>
            <li
              class="usercenter-mode-one router"
              data-router="myOrder"
              style="
                vertical-align: top;
                text-align: center;
                display: inline-block;
                padding-left: 20px;
                line-height: 54px;
                height: 54px;
                width: 25%;
                box-sizing: border-box;
                float: left;
              "
            >
              <div
              @click="$router.push('/addr')"
                style="
                  line-height: normal;
                  vertical-align: middle;
                  display: inline-block;
                  width: 100%;
                  position: relative;
                "
              >
                <van-icon size="20" name="location-o" />
                  <span
                    style="
                      vertical-align: middle;
                      display: inline-block;
                      text-overflow: ellipsis;
                      white-space: nowrap;
                      overflow: hidden;
                      width: 100%;
                      font-size: 12px;
                      font-weight: normal;
                      font-style: normal;
                      font-family: 默认;
                    "
                  >
                    收货地址</span
                  >
              
              </div>
            </li>
            <li style="clear: both; height: 0"></li>
          </ul>
        </div>
        <div
          style="
            opacity: 1;
            font-size: 12px;
            margin-top: 5px;
            color: #353535;
            background-color: #ffffff;
          "
        >
          <p
            style="
              height: 45px;
              line-height: 45px;
              border-bottom: 1px solid #f4f4f4;
              text-indent: 20px;
              font-size: 14px;
              font-weight: bold;
              font-style: normal;
              font-family: 默认;
            "
          >
            会员中心
          </p>
          <ul class="block-item">
            <li
              class="usercenter-mode-one router"
              data-router="myOrder"
              style="
                vertical-align: top;
                text-align: center;
                display: inline-block;
                padding-left: 20px;
                line-height: 54px;
                height: 54px;
                width: 25%;
                box-sizing: border-box;
                float: left;
              "
            >
              <div
                style="
                  line-height: normal;
                  vertical-align: middle;
                  display: inline-block;
                  width: 100%;
                  position: relative;
                "
              >
               <van-icon size="20" name="hot-o" />
                  <span
                    style="
                      vertical-align: middle;
                      display: inline-block;
                      text-overflow: ellipsis;
                      white-space: nowrap;
                      overflow: hidden;
                      width: 100%;
                      font-size: 12px;
                      font-weight: normal;
                      font-style: normal;
                      font-family: 默认;
                    "
                  >
                    优惠券</span
                  >
               
              </div>
            </li>
            <li style="clear: both; height: 0"></li>
          </ul>
        </div>
      </div>
    </div>
      <br>
      <div style="
         width:80vw;
         margin:0 auto
      ">
         <van-button @click="logout()" v-if="userinfo" type="danger" block round>登出</van-button>
         <van-button @click="$router.push('/login')" v-else type="primary" block round>登录</van-button>
      </div>
  </div>
</template>
<script>
import {set,get,remove} from "@/utils/local"

export default {
  data() {
    // let userinfo=get("userinfo")
    // console.log(userinfo);
    return {
      userinfo:{}
    };
  },
  mounted() {
    // console.log(6666);
    this.userinfo=get("userinfo")
  },
  activated(){
    this.userinfo=get("userinfo")

  },
  computed: {},
  methods: {
    logout(){
        remove("userinfo")
        this.$router.push("/login")
    }
  },
};
</script>
<style scoped>
</style>
